/**
 * Created by zhangsong on 2019-01-18.
 */


const Sequelize = require('sequelize');
const { db } = require('../common/mysql');

const tableName = 'result';

const model = db.define(tableName, {
  point: {
    type: Sequelize.INTEGER,
    unique: 'compositeIndex',
    comment: '点'
  },
  date: {
    type: Sequelize.DATEONLY,
    unique: 'compositeIndex',
    comment: '日期'
  },
  level: {
    type: Sequelize.INTEGER,
    comment: '结果'
  },
}, {
  tableName: tableName,
  comment: '结果表',
});

module.exports = model;
